<extend name="layout:index"/>
<block name="style">
<style>
	.grid_4{
		margin-left: 25%;
	}
</style>
</block>
<block name="content">
<div class="mws-panel grid_4">
    <div class="mws-panel-header">
        <span>管理中心-会员编辑</span>
    </div>
    <div class="mws-panel-body no-padding">
        <form class="mws-form" action="/admin/user/xiugai/id/{$user_id}" method="post" onSubmit="return checkForm(this)">
        	<input type="hidden" value="{$user_id}">
            <fieldset class="mws-form-inline">
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">会员名称</label>
                    <div class="mws-form-item">
                        {$res.user_name}
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">姓名</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="true_name" value="{$res.true_name}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">推荐人</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="inviter_id" value="{$res.inviter_id}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">身份证</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="cardno" value="{$res.cardno}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">登录密码</label>
                    <div class="mws-form-item">
                        <input class="large" type="password" name="password"  id='password' value=''>
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">确认登录密码</label>
                    <div class="mws-form-item">
                        <input class="large" type="password" name="password1" id='password1' value=''>
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">安全码</label>
                    <div class="mws-form-item">
                        <input class="large" type="password" name="repassword" id='repassword' value=''>
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">确认安全码</label>
                    <div class="mws-form-item">
                        <input class="large" type="password" name="repassword1" id='repassword1' value=''>
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">联系电话</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="mobile_phone" value="{$res.mobile_phone}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">地址</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="address" value="{$res.address}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">开户银行</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="mainbank" value="{$res.mainbank}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">开户支行</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="bank_name" value="{$res.bank_name}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">银行卡号</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="bank_code" value="{$res.bank_code}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">账户姓名</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="bank_user" value="{$res.bank_user}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">支付宝</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="zhifubao" value="{$res.zhifubao}">
                    </div>
                </div>
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">微信</label>
                    <div class="mws-form-item">
                        <input class="large" type="text" name="weixin" value="{$res.weixin}">
                    </div>
                </div>
                 <div class="mws-form-row bordered" style='display:none'>
                    <label class="mws-form-label">积分</label>
                    <div class="mws-form-item">
                        <span id='user_money1'>{$res.user_money1}</span>
                        <span id='user_money2'>{$res.user_money2}</span>
                     
                    </div>
                </div>
            </fieldset>
            <fieldset class="mws-form-inline">
                <div class="mws-form-row bordered">
                    <label class="mws-form-label">会员类型</label>
                    <div class="mws-form-item">
                        <select name="user_type" class="large">
                            <option <if condition="$res.user_type eq 3"> selected</if> value="3">VIP1</option>
                            <option <if condition="$res.user_type eq 5"> selected</if> value="5">VIP2</option>
                            <option <if condition="$res.user_type eq 10"> selected</if> value="10">VIP3</option>
                            <option <if condition="$res.user_type eq 30"> selected</if> value="30">VIP4</option>
                            <option <if condition="$res.user_type eq 50"> selected</if> value="50">VIP5</option>
                            <option <if condition="$res.user_type eq 100"> selected</if> value="100">VIP6</option>
                        </select>
                    </div>
                </div>
            </fieldset>
            <div class="mws-button-row">
                <input value="修改" class="btn btn-danger" type="submit">
                <input value="重置" class="btn " type="reset">
            </div>
        </form>
    </div>      
</div>
<script>

    function checkForm(){
       var k = false;
        if($('#user_money1').html()<20&&$('#user_money2').html()<20){
          
                var txt=  "您 的 积 分 不 足,不 能 修 改";
                 window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
                return false;
         }else{
            k = true;
         }
       return k;
    }
    
</script>
</block>